/**
 * Site Indicator
 */

.site-indicator__main {
	align-self: center;
	margin-right: 16px;
}

.site-indicator__wrapper {
	align-self: center;
}

.site-indicator__button {
	align-self: center;
	background: var( --color-neutral-0 );
	border: none;
	border-radius: 50%;
	box-shadow: none;
	color: var( --color-neutral-light );
	cursor: default;
	display: block;
	width: 26px;
	height: 26px;
	padding: 2px;
	position: relative;
	text-align: center;
	text-transform: none;
	z-index: z-index( 'root', '.site-indicator__button' );
	overflow: initial;
	line-height: 28px;

	&:focus {
		box-shadow: none;
	}
	.accessible-focus &:focus {
		outline: 0;
		border: 1px dotted var( --color-primary );
		&::before {
			top: 4px;
			left: 4px;
		}
	}

	.is-action & {
		cursor: pointer;
	}

	.is-update & {
		background: var( --color-warning );
		color: var( --color-text-inverted );
	}

	.is-error & {
		background: var( --color-error );
		color: var( --color-text-inverted );
	}

	.is-expanded & {
		.accessible-focus &:focus {
			border: 1px dotted var( --color-surface );
			&::before {
				top: 6px;
				left: 6px;
			}
		}
		.site-indicator__button {
			position: absolute;
				right: 0;
		}
	}

	.notouch & {
		&:hover {
			cursor: pointer;
		}
	}
}

// Displayed on top of a Site element once the user clicks on the button
.site-indicator__message {
	color: var( --color-text-inverted );
	font-size: $font-body-extra-small;
	line-height: 1.4;
	padding: 5px 16px;
	position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	display: flex;
	justify-content: space-between;

	.is-update & {
		background: var( --color-warning );
	}
	.is-error & {
		background: var( --color-error );
	}
}
.site-indicator__action {
	align-self: center;
	display: inline-block;
	vertical-align: middle;

	// Links within the action message
	a:link,
	a.is-borderless.button:hover,
	a:visited,
	.button.is-borderless.is-scary,
	.site-indicator__action-button {
		color: var( --color-text-inverted );
		text-decoration: underline;
	}

	a > .gridicons-external {
		// TODO: improve the styles of ExternalLink to use the relative em units
		margin-left: 0.5em;
		position: static;
	}

	> span {
		display: flex;
		flex-direction: column;

		.button.is-borderless.is-scary {
			align-self: baseline;
		}
	}
}
